*** Settings ***
Library           Selenium2Library
Resource          ../../CommonVars/Locations/SITSYS/MoudleView/LRenewalSearch/LRenewalSearch.robot
Library           collections

*** Keywords ***
Element Shoud be loaded
    [Arguments]    ${locator}
    [Documentation]    元素是否在页面上加载完成
    sleep    2
    #弹框
    ${count}=    Get Element Count    ${locator}
    FOR    ${var}    IN RANGE    0    3
        Run Keyword If    ${count} > 0    Exit for loop
        ${count}=    Get Element Count    ${locator}
    END
    [Return]    ${count}

Go Menu Manager
    [Arguments]    ${LMangerMenu}
    Reload Page
    sleep    2
    ${class}=    Get Element Attribute    ${LMangerMenu}    class
    FOR    ${var}    IN RANGE    0    9999
        Run Keyword If    'active'not in'${class}'    run keywords    Reload Page
        ...    AND    Click Element    ${LMangerMenu}
        ...    ELSE    log    ${class}
        sleep    1
        ${class}=    Get Element Attribute    ${LMangerMenu}    class
        Exit For Loop If    'active'in'${class}'
    END
